package day03;
//运算符的演示
public class OperDemo {
    public static void main(String[] args) {
        /*
        int age=39;
        System.out.println("age=");
        System.out.println(age);
        System.out.println("age="+age);
        System.out.println("我今年"+age+"岁了");

        String name="WKJ";
        System.out.println("大家好，我叫"+name);
        System.out.println("大家好，我叫"+name+"，今年"+age+"岁了");

        String addr="北京市朝阳区";
        System.out.println("大家好，我叫"+name+",今年"+age+"岁了，家住"+addr);
        System.out.println(10+20+30+"");//60
        System.out.println(10+""+20+30);//102030
        System.out.println(3.0+4.5+""+3.0);//7.53.0

        System.out.println(3.0+4.5+3.0+"");//10.5

         */


/*
        int num=0;
        int flag=num>0?1:-1;
        System.out.println(flag);//-1

        int a=9,b=3;
        int max=a>b?a:b;
        System.out.println(max);//9

 */


        /*
        int a=7,b=4;
        int max=a>b?a:b;
        System.out.println(max);

         */
/*
        int a=5;
        a+=10;
        System.out.println(a);//15
        a-=10;
        System.out.println(a);//5
        a*=10;
        System.out.println(a);//50
        a/=10;
        System.out.println(a);//5
        a%=10;
        System.out.println(a);//5

        short s=5;
//        s=s+10;
        s=(short)(s+10);
        System.out.println(s);//15
        s+=10;//相当于s=(short)(s+10)
        System.out.println(s);//25

        s=(short)(s+10);

 */
/*
        int a=5,b=10,c=5;
        System.out.println(b>=a||b<c);//true
        System.out.println(b<=c||b>a);//true
        System.out.println(b!=c|| b>a);//true
        System.out.println(a==b || b<a);//false

        boolean b2=!(a<b);
        System.out.println(b2);//false
        System.out.println(!(a>b));//true

        System.out.println(b>=a || b<c);//true
        System.out.println(a<=b || b>c);//true
        System.out.println(!(a>b && b<=c));//true
        boolean b3=a<b || c++<b;
        System.out.println(b3);//true

 */
/*
       int a=5,b=10,c=5;
        boolean b1=b>=a && b<c;//false
        System.out.println(b1);
        System.out.println(b<=c && b>a );//false
        System.out.println(a==b && b<a);//false
        System.out.println(b!=c && b>a);//true

        int age=56;
        System.out.println(age>=18 && a<=100);//true

        int score=90;
        System.out.println(score>=60 && score<=100);//true

 */
/*

        int a=5,b=5;

        //单独使用，++、--在前在后都一样，就相当于a=a+1;
        //被使用，++\--在前在后不一样，a++的值为a
        //++a的值为a+1

        a++;
        ++b;
        System.out.println(a);//6
        System.out.println(b);//6



        int c=a++;
        int d=++b;
        System.out.println(a);//7
        System.out.println(b);//7
        System.out.println(c);//6
        System.out.println(d);//7


        System.out.println(a++);//7
        System.out.println(++b);//8
        System.out.println(a);//8
        System.out.println(b);//8

        c=++a;
        d=b--;
        System.out.println(a);//9
        System.out.println(b);//7
        System.out.println(c);//9
        System.out.println(d);//8

 */

       int a=5,b=10,c=5;
        boolean b1=a>b;
        System.out.println(b1);//false
        System.out.println(c>b);//false
        System.out.println(a>=c);//true
        System.out.println(a<=b);//true
        System.out.println(a==c);//true
        System.out.println(a!=c);//false

        System.out.println(a%2==0);//false
        System.out.println(a+c>b);//false
        System.out.println(a--==c);//true a--的值为5，a变为4
        System.out.println(a--<c);//true a--的值为4，a变为3
        System.out.println(a++>=c);//false a++的值为3，a变为4
        System.out.println();












    }
}
